<template>
  <el-descriptions :column="2" border>
    <el-descriptions-item label="统一社会信用代码" min-width="150px">
      {{ value.unifiedCode }}
    </el-descriptions-item>
    <el-descriptions-item label="经营状态">
      {{ value.openStatus }}
    </el-descriptions-item>
    <el-descriptions-item label="法定代表人">
      {{ value.legalPerson }}
    </el-descriptions-item>
    <el-descriptions-item label="注册资本">
      {{ value.int_regCapital || '-' }}
    </el-descriptions-item>
    <el-descriptions-item label="公司类型">
      {{ value.entType }}
    </el-descriptions-item>
    <el-descriptions-item label="成立日期">
      {{ value.startDate }}
    </el-descriptions-item>
    <el-descriptions-item label="营业期限">
      {{ value.openTime || '-' }}
    </el-descriptions-item>
    <el-descriptions-item label="核准日期">
      {{ value.annualDate }}
    </el-descriptions-item>
    <el-descriptions-item label="国标行业" span="2">
      {{ value.industry }}
    </el-descriptions-item>
    <el-descriptions-item label="注册地址" span="2">
      {{ value.regAddr }}
    </el-descriptions-item>
    <el-descriptions-item label="经营范围" span="2">
      {{ value.scope }}
    </el-descriptions-item>
  </el-descriptions>
</template>

<script setup lang="ts">
const props = defineProps({
  detail: Object
})
const value = ref('')
watch(
  () => props.detail,
  (val) => {
    if (Object.keys(val).length) {
      value.value = val
    }
  },
  { deep: true }
)
</script>

<style lang="scss" scoped>
:deep(.el-descriptions-item__label) {
  width: 15%;
  background-color: #f6faff;
  color: #666;
}
</style>
